/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package serveur;

import core.CoreController;
import core.CoreThread;
import core.NetPaquet;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author MOI
 */
public class ControllerBoostrap {
    private static CoreController c =null;

    private ControllerBoostrap() {
    }

    public static CoreController init(CoreThread traitementPaquet)
    {
        if(c == null)
        {
            List IN = new ArrayList<NetPaquet>();
            List OUT = new ArrayList<NetPaquet>();
            List Process = new ArrayList<CoreThread>();
            Process.add(traitementPaquet);

            c = new CoreController(Process, IN, OUT);
            traitementPaquet.start();
        }
        return c;
    }
    static public CoreController getInstance()
    {
        return c;
    }

}
